Crate polyfit_residuals
source ·Expand description
Efficiently compute the residual errors for all possible polynomial models up to some degree for given data.
Example
For examples please have a look at the exported functions like residuals_from_front.
Modules
- Basic polynomials in a Newton basis.
- Provides versions of the main functions for the case of a weighted least squares fit. So we calculate the optimal target values of min_{p polynomial of deg d} ∑ᵢ wᵢ(p(xᵢ) - yᵢ)² for all d and valid discrete intervals of i.
Structs
- A fit polynomial together with its residual error
Enums
- The different errors that can occur during the polynomial fitting process.
Functions
- Compute the residual squared errors (RSS) for all polynomials of degree at most
max_deg
for the data segmentsxs[j..=i]
,ys[j..=i]
for alli
,j
. - A parallel version of all_residuals_par. Please have a look at the sequential version for details.
- Compute the residual squared errors (RSS) for all polynomials of degree at most
max_deg
for the data segmentsxs[0..=i]
,ys[0..=i]
for alli
. - Solves the linear system
matrix_product(lhs, x) = rhs
forx
. - Try fitting a polynomial to some data.
- Try fitting a polynomial to some data and also compute the residual error.